<div class="headertitle">
	<span class="header">Users</span>
</div>
<?php echo $this->Html->link("Add a new user", array("controller" => "users", "action" => "add")); ?>
<div style="float: right; margin-bottom: 10px">
<?php
	$this->Paginator->options(array(
		'url' => array(
			'controller' => 'users',
			'action' => 'index'
		)
	));
	echo $this->Paginator->numbers();

?>
</div>
<?php echo $this->Form->Create(array("controller" => "users", "action" => "delete")); ?>
<table cellpadding="0" cellspacing="0">
	<tr>
		<th style="width: 0px"></th>
		<th style="width: 0px"></th>
		<th>Username</th>
		<th>Email</th>
		<th>Created</th>
		<th>Modified</th>
		<th style="width: 0px">ID</th>
	</tr>
	<?php foreach($users as $user): ?>
		<tr>
			<td><?php echo $this->Form->checkbox("selectedUsers.", array("value" => $user['User']['id'], "hiddenField" => false)); ?></td>
			<td><?php echo $this->Html->link($this->Html->image('icons/pencil.png'), array("controller" => "users", "action" => "edit/" . $user['User']['id']), array("escape" => false)); ?></td>
			<td><?php echo $user['User']['username']; ?></td>
			<td><?php echo $user['User']['email']; ?></td>
			<td><?php echo $user['User']['created']; ?></td>
			<td><?php echo $user['User']['modified']; ?></td>
			<td><?php echo $user['User']['id']; ?></td>
		</tr>
	<?php endforeach; ?>
</table>
<?php echo $this->Form->End('Delete Selected'); ?>